package com.home.auto_navigation.ui.controllers;

import org.openqa.selenium.WebElement;

public class Button extends AbstractPageElement{
	
	public Button(WebElement wrappedElement, String name) {
		super(wrappedElement, name);
	}
	
	public void click() {
		if (wrappedElement != null) {
			wrappedElement.click();
			System.out.println("Button "+ name +" click");
		} else System.out.println("Button "+name+" not exist");
	}
	
	public void submit() {
		if (wrappedElement != null) {
			highlightElement();
			wrappedElement.submit();
			System.out.println("Button "+ name +" submit");
			
		} else System.out.println("Button "+name+" not exist");
	}

}
